package router

import (
	//"pro_server/models"
	//"pro_server/models"
	"pro_server/models"
	"pro_server/service"
	"pro_server/utils"

	//"fmt"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
    
	r := gin.Default()
	r.POST("/get_varifycode", service.GetVerifyCode)//获取验证码
    r.POST("/toRegister", service.CreateUser)//注册
	r.POST("/toLogin", service.Login)//登陆 
	r.POST("/toGetImage",utils.SendImage)//发送一张图片
	r.POST("/toGetMsg",models.RedisMsg)//根据聊天窗口
	r.GET("/startChatService", service.Chat)//开启聊天服务
	r.POST("/UpdataReadTime", service.UpdataReadTime)//更新消息读取时间
  //  r.POST("/toGetFriendList",service.GetFriendList)
	return r
} 
